Skip to content

USHIFT-6849: Add C2CC IPv6 tests scenarios#6750

Open
vanhalenar wants to merge 5 commits into
openshift:mainfrom
vanhalenar:c2cc-ipv6
Open

USHIFT-6849: Add C2CC IPv6 tests scenarios#6750
vanhalenar wants to merge 5 commits into
openshift:mainfrom
vanhalenar:c2cc-ipv6

Conversation

@vanhalenar
Copy link
Copy Markdown
Contributor

@vanhalenar vanhalenar commented May 27, 2026

Summary by CodeRabbit

  • Tests
    • Made C2CC tests IP-family-aware via an ${IP_FAMILY} toggle (supports ipv6).
    • Verification and cleanup steps now run IP-family-aware networking commands.
    • FOREIGN_CIDR default is now empty and can be supplied per run.
    • New IPv6 multi-host presubmit scenarios for EL9/EL10 to provision VMs, collect kubeconfigs, and run C2CC suites.
    • Connectivity checks now use IPv6-safe URL formatting when needed.

@vanhalenar vanhalenar requested a review from pmtk May 27, 2026 13:36
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 27, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 27, 2026

@vanhalenar: This pull request references USHIFT-6849 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: a785f0ce-2573-43ef-806b-3fbdab78451e

📥 Commits

Reviewing files that changed from the base of the PR and between 78498ed and a5b7b7c.

📒 Files selected for processing (5)
  • test/resources/c2cc.resource
  • test/scenarios-bootc/el10/presubmits/el102-src@c2cc-ipv6.sh
  • test/scenarios-bootc/el9/presubmits/el98-src@c2cc-ipv6.sh
  • test/suites/c2cc/cleanup.robot
  • test/suites/c2cc/reconciliation.robot
🚧 Files skipped from review as they are similar to previous changes (5)
  • test/suites/c2cc/cleanup.robot
  • test/resources/c2cc.resource
  • test/suites/c2cc/reconciliation.robot
  • test/scenarios-bootc/el10/presubmits/el102-src@c2cc-ipv6.sh
  • test/scenarios-bootc/el9/presubmits/el98-src@c2cc-ipv6.sh

Walkthrough

Adds an ${IP_FAMILY} parameter to Robot C2CC tests (defaulting to ipv4), updates route/rule verification and disruption keywords to use ip -4/ip -6, passes a FOREIGN_CIDR into IPv4 scenarios, and provides full IPv6 presubmit scenario scripts for EL9 and EL10 running C2CC with IP_FAMILY=ipv6.

Changes

IPv6 Support for C2CC Cluster-to-Cluster Testing

Layer / File(s) Summary
IP-family parameterization in test framework
test/resources/c2cc.resource, test/suites/c2cc/cleanup.robot, test/suites/c2cc/reconciliation.robot, test/suites/c2cc/connectivity.robot
Adds ${IP_FAMILY} variable defaulting to ipv4; updates verification and disruption keywords to select ip -4 or ip -6; adjusts curl URL formatting and sets FOREIGN_CIDR default to ${EMPTY}.
IPv4 scenario FOREIGN_CIDR variable
test/scenarios-bootc/el10/presubmits/el102-src@c2cc.sh, test/scenarios-bootc/el9/presubmits/el98-src@c2cc.sh
Existing EL9/EL10 IPv4 scenarios now pass FOREIGN_CIDR=192.0.2.0/24 to the C2CC test suite via --variable.
EL10 IPv6 scenario implementation
test/scenarios-bootc/el10/presubmits/el102-src@c2cc-ipv6.sh
New script defines IPv6 pod/service CIDRs and domains, Greenboot helpers, per-host C2CC YAML/firewall updates, VM creation/teardown, and runs C2CC tests with IP_FAMILY=ipv6.
EL9 IPv6 scenario implementation
test/scenarios-bootc/el9/presubmits/el98-src@c2cc-ipv6.sh
New script mirrors EL10 IPv6 flow: IPv6 constants, Greenboot readiness checks, per-host C2CC config and firewall rules, VM orchestration, and test execution passing IP_FAMILY=ipv6 and remote kubeconfigs to the C2CC suite.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • kasturinarra
🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies that this PR adds C2CC IPv6 test scenarios, which aligns with the primary changes across multiple test files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR contains no Ginkgo tests; only Robot Framework and bash scripts. All test names use stable, descriptive static strings with no dynamic content.
Test Structure And Quality ✅ Passed PR does not contain Ginkgo test code. Changes are to Robot Framework tests, scenario scripts, and resources; the check is not applicable.
Microshift Test Compatibility ✅ Passed No Ginkgo e2e tests added. PR contains only Robot Framework tests (.robot files), Bash scripts (.sh), and resource files (.resource), not Go-based test code.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No Ginkgo e2e tests (It(), Describe(), Context(), When(), etc.) are added in this PR. All changes are Robot Framework tests and bash scenario scripts.
Topology-Aware Scheduling Compatibility ✅ Passed PR adds test infrastructure (Robot tests, scenario scripts) for C2CC IPv6 testing. No deployment manifests, operator code, or controllers with scheduling constraints are modified.
Ote Binary Stdout Contract ✅ Passed PR modifies only test files (Robot Framework, Bash scripts); no OTE binary source code changes detected, so stdout contract check is not applicable.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR adds Robot Framework and Bash tests (not Ginkgo). IPv6 handled correctly: proper CIDRs, dynamic IP_CMD, IPv6 bracket URLs. Check applies only to Ginkgo tests.
No-Weak-Crypto ✅ Passed No weak crypto usage found. PR modifies only test infrastructure files for IPv6 C2CC scenarios with no cryptographic operations.
Container-Privileges ✅ Passed PR contains only test infrastructure files (.robot, .sh, .resource) with no Kubernetes manifests or container definitions. No privileged container configurations found.
No-Sensitive-Data-In-Logs ✅ Passed No sensitive data logging detected. Variables contain test infrastructure CIDRs, domains, and kubeconfig file paths. Log statements log command output only, not credentials or file contents.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested review from jerpeter1 and kasturinarra May 27, 2026 13:39
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 27, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vanhalenar
Once this PR has been reviewed and has the lgtm label, please assign pmtk for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
test/suites/c2cc/reconciliation.robot (1)

76-86: ⚡ Quick win

Add guard for empty FOREIGN_CIDR.

If FOREIGN_CIDR is ${EMPTY}, this test will inject an empty string into the annotation and Should Contain will spuriously pass (empty string is contained in any string). Consider adding a precondition check.

🛡️ Suggested guard

Add at the start of the test case:

 Reconcile SNAT Annotation Preserves Foreign Subnets
     [Documentation]    Inject a foreign subnet into the SNAT annotation, then remove only
     ...    the C2CC CIDRs. Verify the controller merges C2CC CIDRs back without
     ...    removing the foreign subnet.
+    Skip If    '${FOREIGN_CIDR}' == '${EMPTY}'    Test requires FOREIGN_CIDR variable
     [Setup]    Inject Foreign Subnet Into SNAT Annotation    cluster-a    ${FOREIGN_CIDR}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/suites/c2cc/reconciliation.robot` around lines 76 - 86, Add a
precondition guard at the top of the "Reconcile SNAT Annotation Preserves
Foreign Subnets" test to ensure FOREIGN_CIDR is not empty: before calling Inject
Foreign Subnet Into SNAT Annotation, run a check like Fail If   
'${FOREIGN_CIDR}' == '${EMPTY}'    FOREIGN_CIDR must be set (or use Skip Test If
to skip) so that Get Node SNAT Annotation / Should Contain can't pass spuriously
when FOREIGN_CIDR is empty.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/scenarios-bootc/el10/presubmits/el102-src`@c2cc-ipv6.sh:
- Around line 94-95: The call to wait_for_greenboot_on_hosts
"c2cc_pre_greenboot" can fail but its failure is currently ignored; update the
caller so that if wait_for_greenboot_on_hosts returns a non-zero status it is
propagated (e.g., return or exit with that status) before proceeding to any C2CC
reconfiguration steps—ensure the caller checks the return value of
wait_for_greenboot_on_hosts and aborts further actions when it fails so hosts
are not reconfigured while in a bad state.

In `@test/scenarios-bootc/el9/presubmits/el98-src`@c2cc-ipv6.sh:
- Around line 94-95: The call to wait_for_greenboot_on_hosts
"c2cc_pre_greenboot" must not be ignored; check its exit status and propagate
failure (exit non‑zero or return) before proceeding to any C2CC reconfiguration
steps. Update the script so after invoking wait_for_greenboot_on_hosts you test
its result (e.g., if ! wait_for_greenboot_on_hosts "c2cc_pre_greenboot"; then
log an error and exit 1) so the subsequent C2CC config application cannot run
when greenboot did not succeed.

---

Nitpick comments:
In `@test/suites/c2cc/reconciliation.robot`:
- Around line 76-86: Add a precondition guard at the top of the "Reconcile SNAT
Annotation Preserves Foreign Subnets" test to ensure FOREIGN_CIDR is not empty:
before calling Inject Foreign Subnet Into SNAT Annotation, run a check like Fail
If    '${FOREIGN_CIDR}' == '${EMPTY}'    FOREIGN_CIDR must be set (or use Skip
Test If to skip) so that Get Node SNAT Annotation / Should Contain can't pass
spuriously when FOREIGN_CIDR is empty.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 08e63990-2158-4f4e-a16d-2f3984368f54

📥 Commits

Reviewing files that changed from the base of the PR and between a890f0c and 13ce93e.

📒 Files selected for processing (7)
  • test/resources/c2cc.resource
  • test/scenarios-bootc/el10/presubmits/el102-src@c2cc-ipv6.sh
  • test/scenarios-bootc/el10/presubmits/el102-src@c2cc.sh
  • test/scenarios-bootc/el9/presubmits/el98-src@c2cc-ipv6.sh
  • test/scenarios-bootc/el9/presubmits/el98-src@c2cc.sh
  • test/suites/c2cc/cleanup.robot
  • test/suites/c2cc/reconciliation.robot

Comment thread test/scenarios-bootc/el10/presubmits/el102-src@c2cc-ipv6.sh
Comment thread test/scenarios-bootc/el9/presubmits/el98-src@c2cc-ipv6.sh
@vanhalenar
Copy link
Copy Markdown
Contributor Author

/retest

Comment thread test/scenarios-bootc/el9/presubmits/el98-src@c2cc-ipv6.sh Outdated
Comment thread test/scenarios-bootc/el10/presubmits/el102-src@c2cc-ipv6.sh Outdated
Comment thread test/suites/c2cc/cleanup.robot Outdated
Comment thread test/resources/c2cc.resource Outdated
done
}

configure_c2cc_host() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we really need to make common file with reusable functions ASAP. Take a look at USHIFT-7117

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, please :) but I prefer to do it on the next PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can take a look at that

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jun 2, 2026

@vanhalenar: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants